import Request from '@/utils/request'

export function authList (data) {
  return new Request({
    url: '/admin/news/list',
    method: 'post',
    data
  })
}

export function authOne (id) {
  return new Request({
    url: '/admin/news/one',
    method: 'post',
    data: { id }
  })
}

export function authPass (data) {
  return new Request({
    url: '/admin/news/pass',
    method: 'post',
    data
  })
}

export function authFail (data) {
  return new Request({
    url: '/admin/news/fail',
    method: 'post',
    data
  })
}

export function findPublished (data) {
  return new Request({
    url: '/admin/news/findPublished',
    method: 'post',
    data
  })
}

// 文章上架&下架
export function downOrUp (data) {
  return new Request({
    url: '/admin/news/down_or_up',
    method: 'post',
    data
  })
}
